﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineManagement.Web.userControl
{
    public partial class UCSowChildbirth : BaseSowUserControl
    {
        protected Guid _sowId;
        protected int _hoggeryId = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                _hoggeryId = HoggeryID;
                lbBitID.Text = BitID;
                lbPigpenName.Text = PigPenName;
                lbSowType.Text = SowTypeName;
                _sowId = SowID;
                if (PropagateStateOrder != Order)
                {
                    Response.Redirect("SowOperations.aspx");
                }
                BindDropDownList();
            }

        }

        private void BindDropDownList() {
            System.Data.DataSet ds = GetAllPigType;
            if(ds!=null&&ds.Tables!=null){
                ddlChildType.DataSource = ds;
                ddlChildType.DataTextField = "TypeName";
                ddlChildType.DataValueField = "TypeID";
                ddlChildType.DataBind();
            }
        }

    }
}